<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
</head>

<body>
  <script src="./4.17.21/lodash.min.js" type="application/javascript"></script>

  <script>
    const a = {
      name: "zhangsan",
      age: 18,
      address: {
        city: "beijing",
        street: "chaoyang",
      },
      hobby: ["football", "basketball"],
      say: function () {
        console.log("hello");
      },
    };
    const b = _.cloneDeep(a);
    console.log('1 ', a == b);
    console.log('2 ', a.hobby == b.hobby);
    console.log('3 ', a.say === b.say);
    console.log('4 ', a.name === b.name);

    // arr equal

    const arr1 = [{ a: 11 }]
    const arr2 = [{ a: 11 }]
    console.log('arr equal : ', _.isEqual(arr1, arr2));
  </script>
</body>

</html>